3.265 \(\int \frac{(e+f x) \cos ^3(c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=91 \[ \frac{f \cos (c+d x)}{a d^2}-\frac{f \sin (c+d x) \cos (c+d x)}{4 a d^2}-\frac{(e+f x) \sin ^2(c+d x)}{2 a d}+\frac{(e+f x) \sin (c+d x)}{a d}+\frac{f x}{4 a d} \]

[Out]

(f*x)/(4*a*d) + (f*Cos[c + d*x])/(a*d^2) + ((e + f*x)*Sin[c + d*x])/(a*d) - (f*Cos[c + d*x]*Sin[c + d*x])/(4*a
*d^2) - ((e + f*x)*Sin[c + d*x]^2)/(2*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0910735, antiderivative size = 91, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {4523, 3296, 2638, 4404, 2635, 8} \[ \frac{f \cos (c+d x)}{a d^2}-\frac{f \sin (c+d x) \cos (c+d x)}{4 a d^2}-\frac{(e+f x) \sin ^2(c+d x)}{2 a d}+\frac{(e+f x) \sin (c+d x)}{a d}+\frac{f x}{4 a d} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Cos[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

(f*x)/(4*a*d) + (f*Cos[c + d*x])/(a*d^2) + ((e + f*x)*Sin[c + d*x])/(a*d) - (f*Cos[c + d*x]*Sin[c + d*x])/(4*a
*d^2) - ((e + f*x)*Sin[c + d*x]^2)/(2*a*d)

Rule 4523

Int[(Cos[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sin[(c_.) + (d_.)*(x_)]), x_Symbol
] :> Dist[1/a, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2), x], x] - Dist[1/b, Int[(e + f*x)^m*Cos[c + d*x]^(n - 2)*S
in[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 - b^2, 0]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4404

Int[Cos[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Simp[((c +
d*x)^m*Sin[a + b*x]^(n + 1))/(b*(n + 1)), x] - Dist[(d*m)/(b*(n + 1)), Int[(c + d*x)^(m - 1)*Sin[a + b*x]^(n +
 1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{(e+f x) \cos ^3(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac{\int (e+f x) \cos (c+d x) \, dx}{a}-\frac{\int (e+f x) \cos (c+d x) \sin (c+d x) \, dx}{a}\\ &=\frac{(e+f x) \sin (c+d x)}{a d}-\frac{(e+f x) \sin ^2(c+d x)}{2 a d}+\frac{f \int \sin ^2(c+d x) \, dx}{2 a d}-\frac{f \int \sin (c+d x) \, dx}{a d}\\ &=\frac{f \cos (c+d x)}{a d^2}+\frac{(e+f x) \sin (c+d x)}{a d}-\frac{f \cos (c+d x) \sin (c+d x)}{4 a d^2}-\frac{(e+f x) \sin ^2(c+d x)}{2 a d}+\frac{f \int 1 \, dx}{4 a d}\\ &=\frac{f x}{4 a d}+\frac{f \cos (c+d x)}{a d^2}+\frac{(e+f x) \sin (c+d x)}{a d}-\frac{f \cos (c+d x) \sin (c+d x)}{4 a d^2}-\frac{(e+f x) \sin ^2(c+d x)}{2 a d}\\ \end{align*}

Mathematica [A]  time = 0.886143, size = 52, normalized size = 0.57 \[ \frac{d (e+f x) (4 \sin (c+d x)+\cos (2 (c+d x)))-f (\sin (c+d x)-4) \cos (c+d x)}{4 a d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Cos[c + d*x]^3)/(a + a*Sin[c + d*x]),x]

[Out]

(-(f*Cos[c + d*x]*(-4 + Sin[c + d*x])) + d*(e + f*x)*(Cos[2*(c + d*x)] + 4*Sin[c + d*x]))/(4*a*d^2)

________________________________________________________________________________________

Maple [A]  time = 0.054, size = 114, normalized size = 1.3 \begin{align*} -{\frac{1}{a{d}^{2}} \left ( f \left ( -{\frac{ \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{2}}+{\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{4}}+{\frac{dx}{4}}+{\frac{c}{4}} \right ) +{\frac{cf \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{2}}-{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}de}{2}}-f \left ( \cos \left ( dx+c \right ) + \left ( dx+c \right ) \sin \left ( dx+c \right ) \right ) +\sin \left ( dx+c \right ) cf-\sin \left ( dx+c \right ) de \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*cos(d*x+c)^3/(a+a*sin(d*x+c)),x)

[Out]

-1/d^2/a*(f*(-1/2*(d*x+c)*cos(d*x+c)^2+1/4*cos(d*x+c)*sin(d*x+c)+1/4*d*x+1/4*c)+1/2*c*f*cos(d*x+c)^2-1/2*cos(d
*x+c)^2*d*e-f*(cos(d*x+c)+(d*x+c)*sin(d*x+c))+sin(d*x+c)*c*f-sin(d*x+c)*d*e)

________________________________________________________________________________________

Maxima [A]  time = 1.03606, size = 154, normalized size = 1.69 \begin{align*} -\frac{\frac{4 \,{\left (\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right )\right )} e}{a} - \frac{4 \,{\left (\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right )\right )} c f}{a d} - \frac{{\left (2 \,{\left (d x + c\right )} \cos \left (2 \, d x + 2 \, c\right ) + 8 \,{\left (d x + c\right )} \sin \left (d x + c\right ) + 8 \, \cos \left (d x + c\right ) - \sin \left (2 \, d x + 2 \, c\right )\right )} f}{a d}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/8*(4*(sin(d*x + c)^2 - 2*sin(d*x + c))*e/a - 4*(sin(d*x + c)^2 - 2*sin(d*x + c))*c*f/(a*d) - (2*(d*x + c)*c
os(2*d*x + 2*c) + 8*(d*x + c)*sin(d*x + c) + 8*cos(d*x + c) - sin(2*d*x + 2*c))*f/(a*d))/d

________________________________________________________________________________________

Fricas [A]  time = 1.6327, size = 167, normalized size = 1.84 \begin{align*} -\frac{d f x - 2 \,{\left (d f x + d e\right )} \cos \left (d x + c\right )^{2} - 4 \, f \cos \left (d x + c\right ) -{\left (4 \, d f x + 4 \, d e - f \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, a d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/4*(d*f*x - 2*(d*f*x + d*e)*cos(d*x + c)^2 - 4*f*cos(d*x + c) - (4*d*f*x + 4*d*e - f*cos(d*x + c))*sin(d*x +
 c))/(a*d^2)

________________________________________________________________________________________

Sympy [A]  time = 10.7832, size = 787, normalized size = 8.65 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)**3/(a+a*sin(d*x+c)),x)

[Out]

Piecewise((24*d*e*tan(c/2 + d*x/2)**3/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d*
*2) - 24*d*e*tan(c/2 + d*x/2)**2/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) +
 24*d*e*tan(c/2 + d*x/2)/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) + 3*d*f*x
*tan(c/2 + d*x/2)**4/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) + 24*d*f*x*ta
n(c/2 + d*x/2)**3/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) - 18*d*f*x*tan(c
/2 + d*x/2)**2/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) + 24*d*f*x*tan(c/2
+ d*x/2)/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) + 3*d*f*x/(12*a*d**2*tan(
c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) - 14*f*tan(c/2 + d*x/2)**4/(12*a*d**2*tan(c/2 + d
*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) + 6*f*tan(c/2 + d*x/2)**3/(12*a*d**2*tan(c/2 + d*x/2)**4
 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) - 4*f*tan(c/2 + d*x/2)**2/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*
d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2) - 6*f*tan(c/2 + d*x/2)/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/
2 + d*x/2)**2 + 12*a*d**2) + 10*f/(12*a*d**2*tan(c/2 + d*x/2)**4 + 24*a*d**2*tan(c/2 + d*x/2)**2 + 12*a*d**2),
 Ne(d, 0)), ((e*x + f*x**2/2)*cos(c)**3/(a*sin(c) + a), True))

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cos(d*x+c)^3/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

Timed out